<?php

include_once '../tools/DbTools.php';

session_start();
$OutMoney = $_POST['OutMoney'];
$token = $_COOKIE['Token'];
$userInfo = $_SESSION[$token];
$CardId = $userInfo['CardId'];

DbTools::initDb();

$sql = "select CardMoney from bankcard where CardId='$CardId'";

$result = DbTools::select($sql);
$money = $result[0]['CardMoney'];
DbTools::close();

?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<body>
<form action="moneyOutAction.php" method="post">
    当前余额：<input type="text" name="" id="" value="<?php echo $money;?>" readonly="readonly" disabled="disabled" /><br>
    取钱金额：<input type="text" name="OutMoney" id="" value="" /><br>
    <input type="submit" name="" id="" value="取出" />
</form>
</body>
</html>